package com.myproject.SchoolSystem.emtity;

public interface Workable {
    void work();
}
class Teacher extends SchoolSystem implements Workable {

    public void work() {
        System.out.println(name + " is teaching.");
    }
}
class Student extends SchoolSystem implements Workable {
    public void work() {
        System.out.println(name + "is studying.");
    }
}
class SchoolSystem {


    String name;

    public static void main(String[] args) {
        Teacher teacher = new Teacher();
        teacher.name = "Mr.Smith";
        teacher.work();

        Student student = new Student();
        student.name = "Alice";
        student.work();
    }
}
